﻿CREATE TABLE [dbo].[tb_deal]
(
	deal_id bigint identity(1,1) primary key,
	deal_code nvarchar(20) not null,
	deal_customer nvarchar(20) not null,
	deal_store money not null,
	deal_others money not null,
	deal_discount money not null,
	deal_total money not null,
	deal_rest money not null,
	deal_date smalldatetime not null,
	deal_credit nvarchar(20) check (deal_credit in('未开','已开')) not null,
	deal_memo nvarchar(20) default('') not null,
	deal_oman nvarchar(20) not null,
	deal_otime smalldatetime not null
);